home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ian & Stuart's Australian Mac 1993 September
/
clonecd
/
September 93.img
/
Archives
/
Fun, Tricks & Hacks
/
Hacks & Tricks - CARE
/
HotShift
/
GetMouse.c
next >
Wrap
C/C++ Source or Header
|
1991-09-01
|
701b
|
31 lines
pascal void main(Point *thePt);
pascal void main(Point *thePt)
{
pascal void (*addr)(Point *);
// Ptr addr;
Ptr globalP;
asm {
MOVEM.L A2-A5/D1-D7, -(A7) /* Save the non-volitle registers */
}
addr = *(void**)(((Ptr)&main) - 8); /* Get the address of destination trap */
globalP = *(Ptr *)(((Ptr)&main) - 4); /* Get the address of global storage */
/* The structure is:
long OldTrapAddress;
Ptr globalDataSpace; */
(*addr)(thePt);
thePt->h -= 32;
thePt->v -= 32;
// DebugStr("\PMade it!");
// asm {
// MOVEM.L (A7)+, A2-A5/D1-D7 /* Restore the non-volitle registers */
// MOVE.L addr, A0
// UNLK A6
// JMP (A0)
// };
}